<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>连接chrome调试 | Teler的日常</title>
    <meta name="generator" content="VuePress 1.9.9">
    <link rel="icon" href="/img/favicon.ico">
    <meta name="description" content="博客小站，记录我的学习日常和心情等">
    <meta name="keywords" content="前端博客,个人技术博客,前端,前端开发,前端框架,web前端,前端面试题,技术文档,学习,面试,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown">
    <meta name="baidu-site-verification" content="code-Rpieelje4H">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/assets/css/0.styles.bb5b1957.css" as="style"><link rel="preload" href="/assets/js/app.d41d74c0.js" as="script"><link rel="preload" href="/assets/js/2.023436e0.js" as="script"><link rel="preload" href="/assets/js/49.08b41247.js" as="script"><link rel="prefetch" href="/assets/js/10.f3664957.js"><link rel="prefetch" href="/assets/js/100.98bebc7f.js"><link rel="prefetch" href="/assets/js/101.fe34203c.js"><link rel="prefetch" href="/assets/js/102.ff08e3d5.js"><link rel="prefetch" href="/assets/js/103.7f0f328d.js"><link rel="prefetch" href="/assets/js/104.cf87ee60.js"><link rel="prefetch" href="/assets/js/105.a87694e9.js"><link rel="prefetch" href="/assets/js/106.a478e8b1.js"><link rel="prefetch" href="/assets/js/107.720dff4e.js"><link rel="prefetch" href="/assets/js/108.27f0de33.js"><link rel="prefetch" href="/assets/js/109.f567acfb.js"><link rel="prefetch" href="/assets/js/11.f2e49a76.js"><link rel="prefetch" href="/assets/js/110.9763d4af.js"><link rel="prefetch" href="/assets/js/111.db6527e1.js"><link rel="prefetch" href="/assets/js/112.a20bf841.js"><link rel="prefetch" href="/assets/js/113.fffb90e0.js"><link rel="prefetch" href="/assets/js/114.e10b299e.js"><link rel="prefetch" href="/assets/js/115.73b68794.js"><link rel="prefetch" href="/assets/js/116.a41be574.js"><link rel="prefetch" href="/assets/js/117.f49ddfb7.js"><link rel="prefetch" href="/assets/js/118.f31c49c3.js"><link rel="prefetch" href="/assets/js/119.e7ddd80c.js"><link rel="prefetch" href="/assets/js/12.684abe5a.js"><link rel="prefetch" href="/assets/js/120.ab58a792.js"><link rel="prefetch" href="/assets/js/121.8070a099.js"><link rel="prefetch" href="/assets/js/122.bd4aa83d.js"><link rel="prefetch" href="/assets/js/123.8b28ab66.js"><link rel="prefetch" href="/assets/js/124.c64e8a82.js"><link rel="prefetch" href="/assets/js/125.8c37e25d.js"><link rel="prefetch" href="/assets/js/126.7a965ec1.js"><link rel="prefetch" href="/assets/js/127.15e3f4d7.js"><link rel="prefetch" href="/assets/js/128.92e24736.js"><link rel="prefetch" href="/assets/js/129.376be23d.js"><link rel="prefetch" href="/assets/js/13.f2551a14.js"><link rel="prefetch" href="/assets/js/130.cde8392a.js"><link rel="prefetch" href="/assets/js/131.f7e13266.js"><link rel="prefetch" href="/assets/js/132.a518186c.js"><link rel="prefetch" href="/assets/js/133.d4a43462.js"><link rel="prefetch" href="/assets/js/134.95f419b0.js"><link rel="prefetch" href="/assets/js/135.07df0368.js"><link rel="prefetch" href="/assets/js/136.08277af4.js"><link rel="prefetch" href="/assets/js/137.3c3b9976.js"><link rel="prefetch" href="/assets/js/138.1e1bb8ce.js"><link rel="prefetch" href="/assets/js/139.78d61366.js"><link rel="prefetch" href="/assets/js/14.4fac3ae1.js"><link rel="prefetch" href="/assets/js/15.c4e1a86c.js"><link rel="prefetch" href="/assets/js/16.08f9cfab.js"><link rel="prefetch" href="/assets/js/17.40f3d3ac.js"><link rel="prefetch" href="/assets/js/18.004165c1.js"><link rel="prefetch" href="/assets/js/19.71a91c37.js"><link rel="prefetch" href="/assets/js/20.be80e063.js"><link rel="prefetch" href="/assets/js/21.dd2e712d.js"><link rel="prefetch" href="/assets/js/22.efedd1da.js"><link rel="prefetch" href="/assets/js/23.b8d5f0c5.js"><link rel="prefetch" href="/assets/js/24.8895cb39.js"><link rel="prefetch" href="/assets/js/25.f72d16f6.js"><link rel="prefetch" href="/assets/js/26.700b8757.js"><link rel="prefetch" href="/assets/js/27.2d888c7a.js"><link rel="prefetch" href="/assets/js/28.c95a06e3.js"><link rel="prefetch" href="/assets/js/29.030c41dc.js"><link rel="prefetch" href="/assets/js/3.ae79ad07.js"><link rel="prefetch" href="/assets/js/30.024d7386.js"><link rel="prefetch" href="/assets/js/31.90222925.js"><link rel="prefetch" href="/assets/js/32.98d886f9.js"><link rel="prefetch" href="/assets/js/33.fdc186c5.js"><link rel="prefetch" href="/assets/js/34.c6364dc9.js"><link rel="prefetch" href="/assets/js/35.90745c1a.js"><link rel="prefetch" href="/assets/js/36.ad08862a.js"><link rel="prefetch" href="/assets/js/37.dec32d64.js"><link rel="prefetch" href="/assets/js/38.3838a6c1.js"><link rel="prefetch" href="/assets/js/39.f4e4d4db.js"><link rel="prefetch" href="/assets/js/4.92869e3b.js"><link rel="prefetch" href="/assets/js/40.5fd3bb13.js"><link rel="prefetch" href="/assets/js/41.51a8fdd5.js"><link rel="prefetch" href="/assets/js/42.82c2e073.js"><link rel="prefetch" href="/assets/js/43.f0ea2a9e.js"><link rel="prefetch" href="/assets/js/44.671c08a7.js"><link rel="prefetch" href="/assets/js/45.5d15b10b.js"><link rel="prefetch" href="/assets/js/46.95005641.js"><link rel="prefetch" href="/assets/js/47.c9ab5796.js"><link rel="prefetch" href="/assets/js/48.43986c57.js"><link rel="prefetch" href="/assets/js/5.5e32f39e.js"><link rel="prefetch" href="/assets/js/50.c11a05b9.js"><link rel="prefetch" href="/assets/js/51.639c8ff2.js"><link rel="prefetch" href="/assets/js/52.df138aff.js"><link rel="prefetch" href="/assets/js/53.39e24743.js"><link rel="prefetch" href="/assets/js/54.f975b5ab.js"><link rel="prefetch" href="/assets/js/55.3ac72402.js"><link rel="prefetch" href="/assets/js/56.ed625cdd.js"><link rel="prefetch" href="/assets/js/57.65af0446.js"><link rel="prefetch" href="/assets/js/58.3468c7f0.js"><link rel="prefetch" href="/assets/js/59.fea7da2c.js"><link rel="prefetch" href="/assets/js/6.3caf43c7.js"><link rel="prefetch" href="/assets/js/60.b978be38.js"><link rel="prefetch" href="/assets/js/61.17791f1f.js"><link rel="prefetch" href="/assets/js/62.3cd7c7e2.js"><link rel="prefetch" href="/assets/js/63.941cd4c6.js"><link rel="prefetch" href="/assets/js/64.7d62a354.js"><link rel="prefetch" href="/assets/js/65.0f35ef90.js"><link rel="prefetch" href="/assets/js/66.c9cd517d.js"><link rel="prefetch" href="/assets/js/67.ed261888.js"><link rel="prefetch" href="/assets/js/68.ab36cb55.js"><link rel="prefetch" href="/assets/js/69.e43a29c4.js"><link rel="prefetch" href="/assets/js/7.49459967.js"><link rel="prefetch" href="/assets/js/70.9c465e47.js"><link rel="prefetch" href="/assets/js/71.10344edd.js"><link rel="prefetch" href="/assets/js/72.9b399737.js"><link rel="prefetch" href="/assets/js/73.11e18677.js"><link rel="prefetch" href="/assets/js/74.9ab52ddf.js"><link rel="prefetch" href="/assets/js/75.15e0a627.js"><link rel="prefetch" href="/assets/js/76.433e942f.js"><link rel="prefetch" href="/assets/js/77.6f9979c4.js"><link rel="prefetch" href="/assets/js/78.c2cb7a93.js"><link rel="prefetch" href="/assets/js/79.7fc614fb.js"><link rel="prefetch" href="/assets/js/8.32c107dd.js"><link rel="prefetch" href="/assets/js/80.c75ae340.js"><link rel="prefetch" href="/assets/js/81.1d958700.js"><link rel="prefetch" href="/assets/js/82.9df67712.js"><link rel="prefetch" href="/assets/js/83.b3454e49.js"><link rel="prefetch" href="/assets/js/84.425e9e1a.js"><link rel="prefetch" href="/assets/js/85.d59ea930.js"><link rel="prefetch" href="/assets/js/86.4bdd04a1.js"><link rel="prefetch" href="/assets/js/87.121c124e.js"><link rel="prefetch" href="/assets/js/88.5a75898f.js"><link rel="prefetch" href="/assets/js/89.b87b375d.js"><link rel="prefetch" href="/assets/js/9.59e8ac2a.js"><link rel="prefetch" href="/assets/js/90.e51756a8.js"><link rel="prefetch" href="/assets/js/91.f8cae4b0.js"><link rel="prefetch" href="/assets/js/92.81b133ff.js"><link rel="prefetch" href="/assets/js/93.8350bd06.js"><link rel="prefetch" href="/assets/js/94.2d121b75.js"><link rel="prefetch" href="/assets/js/95.ef51b143.js"><link rel="prefetch" href="/assets/js/96.7d2163d3.js"><link rel="prefetch" href="/assets/js/97.a3cbbfc7.js"><link rel="prefetch" href="/assets/js/98.5ddb1d6b.js"><link rel="prefetch" href="/assets/js/99.5b21b4a2.js">
    <link rel="stylesheet" href="/assets/css/0.styles.bb5b1957.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container have-rightmenu have-body-img"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/img/logo.png" alt="Teler的日常" class="logo"> <span class="site-name can-hide">Teler的日常</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div> <a href="https://github.com/fangweilong" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><div class="blogger"><img src="/img/logo.png"> <div class="blogger-info"><h3>Teler</h3> <span>Day Day Up</span></div></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div> <a href="https://github.com/fangweilong" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>mybatis</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/bc7e0d/" class="sidebar-link">利用mybatis-plus实现数据权限</a></li><li><a href="/pages/6a9b8d/" class="sidebar-link">mybatis查询数据赋值到model里面为空</a></li><li><a href="/pages/349952/" class="sidebar-link">mybatis传入多个参数</a></li><li><a href="/pages/3c238c/" class="sidebar-link">mybatis传入字符串分割</a></li><li><a href="/pages/f4f3b7/" class="sidebar-link">mybatis使用枚举类 类型转换错误</a></li><li><a href="/pages/846415/" class="sidebar-link">mybatis查询数据赋值到model里面为空</a></li><li><a href="/pages/39442c/" class="sidebar-link">mybatis通过mybatis-plus查询的类型转化错误</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>lambda</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>maven</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>算法</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>spring boot</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>spring cloud</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>jsp</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>tomcat</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>cloudflare</span> <span class="arrow right"></span></p> <!----></section></li><li><a href="/pages/bf5f65/" class="sidebar-link">bootdo框架使用步骤总结</a></li><li><a href="/pages/f3e09f/" class="sidebar-link">filter拦截器获取http请求参数</a></li><li><a href="/pages/3ac4b1/" class="sidebar-link">java-String字符串split分割无效</a></li><li><a href="/pages/f38461/" class="sidebar-link">java表单提交，调用doNet的webservice乱码</a></li><li><a href="/pages/669f30/" class="sidebar-link">java访问webservice</a></li><li><a href="/pages/22420c/" class="sidebar-link">Long返回给前台在js中丢失精度</a></li><li><a href="/pages/a5eb49/" class="sidebar-link">MongoDB查询</a></li><li><a href="/pages/d31b31/" class="sidebar-link">NoSuchMethodError</a></li><li><a href="/pages/4589a8/" class="sidebar-link">PropertyNotFoundException</a></li><li><a href="/pages/311841/" class="sidebar-link">使用java生成微信随机加好友的链接</a></li><li><a href="/pages/6e84e0/" aria-current="page" class="active sidebar-link">连接chrome调试</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#应用场景" class="sidebar-link">应用场景</a></li><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#地址" class="sidebar-link">地址</a></li><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#安装webdriver" class="sidebar-link">安装WebDriver</a></li><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#安装chrome" class="sidebar-link">安装Chrome</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/6e84e0/#参数解释" class="sidebar-link">参数解释</a></li></ul></li><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#判断" class="sidebar-link">判断</a></li><li class="sidebar-sub-header level2"><a href="/pages/6e84e0/#java代码" class="sidebar-link">JAVA代码</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/6e84e0/#爬取元素" class="sidebar-link">爬取元素</a></li><li class="sidebar-sub-header level3"><a href="/pages/6e84e0/#定时任务" class="sidebar-link">定时任务</a></li></ul></li></ul></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper bg-style-1"><div class="articleInfo-wrap" data-v-06225672><div class="articleInfo" data-v-06225672><ul class="breadcrumbs" data-v-06225672><li data-v-06225672><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-06225672></a></li> <li data-v-06225672><a href="/categories/?category=java" title="分类" data-v-06225672>java</a></li></ul> <div class="info" data-v-06225672><div title="作者" class="author iconfont icon-touxiang" data-v-06225672><a href="https://github.com/fangweilong" target="_blank" title="作者" class="beLink" data-v-06225672>Teler</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-06225672><a href="javascript:;" data-v-06225672>2024-07-23</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">连接chrome调试<!----></h1>  <div class="theme-vdoing-content content__default"><h2 id="应用场景"><a href="#应用场景" class="header-anchor">#</a> 应用场景</h2> <ol><li>调用接口，接口打开一个网页，从网页中获取到二维码返回给用户扫码</li> <li>二维码返回以后不能立刻关闭网页，需要等待扫码回调访问接口</li> <li>如果用户扫完码，需要关闭这个网页防止内存占用过多导致崩溃</li> <li>如果用户一直没扫码，等待五分钟以后关闭这个网页防止内存占用过多导致崩溃</li></ol> <h2 id="地址"><a href="#地址" class="header-anchor">#</a> 地址</h2> <p><a href="https://registry.npmmirror.com/binary.html?path=chrome-for-testing" target="_blank" rel="noopener noreferrer">下载地址<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p><em>注意要保证WebDriver和Chrome版本的绝对一致性</em><br> <em>注意要保证WebDriver和Chrome版本的绝对一致性</em><br> <em>注意要保证WebDriver和Chrome版本的绝对一致性</em></p> <p>centos7的服务器默认使用125.0.6422.141版本，再新的版本会出现依赖库问题，其他服务器版本请自行测试</p> <h2 id="安装webdriver"><a href="#安装webdriver" class="header-anchor">#</a> 安装WebDriver</h2> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment"># 解压</span>
<span class="token function">unzip</span> chromedriver-linux64.zip

<span class="token comment"># 移动</span>
<span class="token function">mv</span> ./chromedriver-linux64/chromedriver /usr/local/share/

<span class="token builtin class-name">cd</span> /usr/local/share/

<span class="token comment"># 执行权限</span>
<span class="token function">chmod</span> +x chromedriver

<span class="token comment"># 软连接</span>
<span class="token function">ln</span> <span class="token parameter variable">-s</span> /usr/local/share/chromedriver /usr/local/bin/chromedriver
<span class="token comment"># 软连接</span>
<span class="token function">ln</span> <span class="token parameter variable">-s</span> /usr/local/share/chromedriver /usr/bin/chromedriver

<span class="token comment"># 验证</span>
chromedriver <span class="token parameter variable">--version</span>

<span class="token comment"># --port 设置chromedriver的连接端口</span>
<span class="token comment"># --whitelisted-ips 设置白名单 生产服慎用</span>
<span class="token function">nohup</span> chromedriver <span class="token parameter variable">--port</span><span class="token operator">=</span><span class="token number">13889</span> --whitelisted-ips<span class="token operator">=</span><span class="token string">''</span> <span class="token operator">&amp;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br></div></div><h2 id="安装chrome"><a href="#安装chrome" class="header-anchor">#</a> 安装Chrome</h2> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">unzip</span> chrome-linux64.zip

<span class="token function">mv</span> chrome-linux64 /usr/local/share/

<span class="token function">ln</span> <span class="token parameter variable">-s</span> /usr/local/share/chrome-linux64/chrome /usr/bin/chrome

<span class="token comment"># 验证</span>
chrome <span class="token parameter variable">--version</span> --no-sandbox

<span class="token comment"># 后台启动chrome 各个参数的作用看下方</span>
nphup chrome <span class="token parameter variable">--headless</span> --disable-gpu --disable-software-rasterizer --no-sandbox --remote-debugging-address<span class="token operator">=</span><span class="token number">0.0</span>.0.0 --no-first-run --no-default-browser-check --disable-software-rasterizer --disable-software-compositing --remote-debugging-port<span class="token operator">=</span><span class="token number">13888</span> --user-data-dir<span class="token operator">=</span>/data/chrome/13888 --enable-logging <span class="token parameter variable">--v</span><span class="token operator">=</span><span class="token number">1</span> --new-window <span class="token string">&quot;https://网址.com&quot;</span> %
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h3 id="参数解释"><a href="#参数解释" class="header-anchor">#</a> 参数解释</h3> <ul><li><p><code>--headless</code></p> <ul><li>启用无头模式。无头模式允许 Chrome 在没有图形用户界面的情况下运行，适用于服务器环境和自动化测试。</li></ul></li> <li><p><code>--disable-gpu</code></p> <ul><li>禁用 GPU 硬件加速。由于无头模式不需要显示图形，因此禁用 GPU 可以减少资源消耗。</li></ul></li> <li><p><code>--disable-software-rasterizer</code></p> <ul><li>禁用软件光栅化器。这个选项通常与 <code>--disable-gpu</code> 一起使用，以确保完全禁用 GPU 和软件光栅化器。</li></ul></li> <li><p><code>--no-sandbox</code></p> <ul><li>禁用沙盒模式。沙盒模式用于安全性隔离，通常用于测试或自动化环境，但禁用它可以提高兼容性（注意安全性风险）。</li></ul></li> <li><p><code>--remote-debugging-address=0.0.0.0</code></p> <ul><li>设置远程调试的绑定地址为所有可用的网络接口。允许外部设备连接到 Chrome 的远程调试端口。生产服慎用</li></ul></li> <li><p><code>--no-first-run</code></p> <ul><li>禁用首次运行检查。通常在 Chrome 首次运行时，会显示欢迎页面和默认浏览器设置对话框，此选项可跳过这些步骤。</li></ul></li> <li><p><code>--no-default-browser-check</code></p> <ul><li>禁用默认浏览器检查。Chrome 启动时不会检查是否设置为默认浏览器，适用于自动化测试环境。</li></ul></li> <li><p><code>--disable-software-compositing</code></p> <ul><li>禁用软件合成。确保渲染完全依赖 CPU，而不是软件合成路径。</li></ul></li> <li><p><code>--remote-debugging-port=13888</code></p> <ul><li>设置远程调试端口为 13888。允许外部工具通过该端口连接和控制 Chrome 实例。</li></ul></li> <li><p><code>--user-data-dir=/data/chrome/13888</code></p> <ul><li>指定用户数据目录。Chrome 会将用户数据和配置文件存储在这个目录中，确保数据隔离。</li></ul></li> <li><p><code>--enable-logging</code></p> <ul><li>启用日志记录。用于调试和监控，生成详细的日志信息。</li></ul></li> <li><p><code>--v=1</code></p> <ul><li>设置日志详细级别。数字越大，日志信息越详细，1 表示基本信息。</li></ul></li> <li><p><code>--new-window</code></p> <ul><li>启动 Chrome 并打开一个新窗口。此选项可确保 Chrome 以新的浏览窗口启动。远程调试的情况下这个参数很重要。</li></ul></li> <li><p><code>https://网址.com</code></p> <ul><li>启动时打开的默认网页。在启动 Chrome 后，会自动导航到指定的 URL。</li></ul></li></ul> <h2 id="判断"><a href="#判断" class="header-anchor">#</a> 判断</h2> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment"># 获取到chrome版本</span>
<span class="token function">curl</span> localhost:13888/json/version

<span class="token comment"># 获取到chrome打开的tab。这一步很重要，如果一直为[]，webDriver连接会报错，所以要保证起码有一个tab打开</span>
<span class="token function">curl</span> localhost:13888/json/list
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h2 id="java代码"><a href="#java代码" class="header-anchor">#</a> JAVA代码</h2> <h3 id="爬取元素"><a href="#爬取元素" class="header-anchor">#</a> 爬取元素</h3> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token comment">// 设置 ChromeOptions</span>
<span class="token class-name">ChromeOptions</span> options <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ChromeOptions</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--headless&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//无头模式</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--disable-gpu&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//禁用GPU</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-sandbox&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//禁用沙盒</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--incognito&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//无痕</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-first-run&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//禁用首次运行</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-default-browser-check&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//禁用默认浏览器检查</span>
options<span class="token punctuation">.</span><span class="token function">setExperimentalOption</span><span class="token punctuation">(</span><span class="token string">&quot;debuggerAddress&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;localhost:13888&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//调试端口号  不能加http或者https前缀 否则会报错</span>
<span class="token comment">// 连接到远程的 ChromeDriver</span>
<span class="token class-name">URL</span> remoteUrl <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">URL</span><span class="token punctuation">(</span><span class="token string">&quot;http://localhost:13889&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">WebDriver</span> chromeWebDriver <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">RemoteWebDriver</span><span class="token punctuation">(</span>remoteUrl<span class="token punctuation">,</span> options<span class="token punctuation">)</span><span class="token punctuation">;</span>
chromeWebDriver<span class="token punctuation">.</span><span class="token function">switchTo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">newWindow</span><span class="token punctuation">(</span><span class="token class-name">WindowType</span><span class="token punctuation">.</span><span class="token constant">TAB</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>authorizationData<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//操作的等待时长，防止DOM、js加载慢导致报错</span>
<span class="token class-name">WebDriverWait</span> webDriverWait <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">WebDriverWait</span><span class="token punctuation">(</span>chromeWebDriver<span class="token punctuation">,</span> <span class="token class-name">Duration</span><span class="token punctuation">.</span><span class="token function">ofMillis</span><span class="token punctuation">(</span><span class="token number">5000</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">try</span> <span class="token punctuation">{</span>
	<span class="token comment">//窗口句柄。因为不直接执行drover.close()或driver.quit()，所以需要获取窗口句柄存储到redis、mysql之类的，给其他接口或者定时去关闭</span>
	<span class="token class-name">String</span> windowHandle <span class="token operator">=</span> chromeWebDriver<span class="token punctuation">.</span><span class="token function">getWindowHandle</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

	<span class="token comment">//校验元素是否有（有等待时长）</span>
	webDriverWait<span class="token punctuation">.</span><span class="token function">until</span><span class="token punctuation">(</span><span class="token class-name">ExpectedConditions</span><span class="token punctuation">.</span><span class="token function">presenceOfElementLocated</span><span class="token punctuation">(</span><span class="token class-name">By</span><span class="token punctuation">.</span><span class="token function">className</span><span class="token punctuation">(</span><span class="token string">&quot;qr&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

	<span class="token comment">//获取元素</span>
	<span class="token class-name">WebElement</span> webElement <span class="token operator">=</span> chromeWebDriver<span class="token punctuation">.</span><span class="token function">findElement</span><span class="token punctuation">(</span><span class="token class-name">By</span><span class="token punctuation">.</span><span class="token function">className</span><span class="token punctuation">(</span><span class="token string">&quot;qr&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token class-name">String</span> srcData <span class="token operator">=</span> <span class="token string">&quot;&quot;</span><span class="token punctuation">;</span>
	<span class="token keyword">if</span> <span class="token punctuation">(</span>webElement<span class="token punctuation">.</span><span class="token function">isEnabled</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
		srcData <span class="token operator">=</span> webElement<span class="token punctuation">.</span><span class="token function">getAttribute</span><span class="token punctuation">(</span><span class="token string">&quot;src&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>

	<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>srcData<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">Exception</span> e<span class="token punctuation">)</span> <span class="token punctuation">{</span>
	<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token string">&quot;抓取失败，,原因：&quot;</span><span class="token operator">+</span>e<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br></div></div><h3 id="定时任务"><a href="#定时任务" class="header-anchor">#</a> 定时任务</h3> <p><em>这里没有定时任务的启动代码，请根据自己的代码进行包装</em></p> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token comment">// 设置 ChromeOptions</span>
<span class="token class-name">ChromeOptions</span> options <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ChromeOptions</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--headless&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//无头模式</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--disable-gpu&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//禁用GPU</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-sandbox&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//禁用沙盒</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--incognito&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//无痕</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-first-run&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//禁用首次运行</span>
options<span class="token punctuation">.</span><span class="token function">addArguments</span><span class="token punctuation">(</span><span class="token string">&quot;--no-default-browser-check&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//禁用默认浏览器检查</span>
options<span class="token punctuation">.</span><span class="token function">setExperimentalOption</span><span class="token punctuation">(</span><span class="token string">&quot;debuggerAddress&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;localhost:13888&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//调试端口号 不能加http或者https前缀</span>
<span class="token comment">// 连接到远程的 ChromeDriver</span>
<span class="token class-name">URL</span> remoteUrl <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">URL</span><span class="token punctuation">(</span><span class="token string">&quot;http://localhost:13889&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">WebDriver</span> webDriver <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">RemoteWebDriver</span><span class="token punctuation">(</span>remoteUrl<span class="token punctuation">,</span> options<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token string">&quot;定时任务的remoteDriver连接上了&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Set</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> driverWindowHandles <span class="token operator">=</span> webDriver<span class="token punctuation">.</span><span class="token function">getWindowHandles</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token string">&quot;当前一共有 &quot;</span><span class="token operator">+</span>driverWindowHandles<span class="token punctuation">.</span><span class="token function">size</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">+</span><span class="token string">&quot; 个窗口句柄&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token class-name">String</span> driverWindowHandle <span class="token operator">:</span> driverWindowHandles<span class="token punctuation">)</span> <span class="token punctuation">{</span>
	<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token string">&quot;窗口句柄：&quot;</span><span class="token operator">+</span>driverWindowHandle<span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token comment">//切换窗口</span>
	webDriver<span class="token punctuation">.</span><span class="token function">switchTo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">window</span><span class="token punctuation">(</span>driverWindowHandle<span class="token punctuation">)</span><span class="token punctuation">;</span>

	<span class="token comment">/**
	 * 关闭tab。
	 * 注意是close不是quit，且不能关闭最后一个默认打开的tab。close只会关闭当前页不会退出driver，如果是quit会导致drirver直接退出无法连接。
	 * 这里省略了是否要关闭这个tab的判断，自行补充你的逻辑
	 */</span>
	<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token class-name">StrUtil</span><span class="token punctuation">.</span><span class="token function">startWith</span><span class="token punctuation">(</span>webDriver<span class="token punctuation">.</span><span class="token function">getCurrentUrl</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token string">&quot;https://网址.com&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
		webDriver<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br></div></div></div></div>  <div class="page-edit"><div class="edit-link"><a href="https://github.com/fangweilong/edit/master/docs/01.java/20.连接chrome调试.md" target="_blank" rel="noopener noreferrer">编辑</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="tags"><a href="/tags/?tag=java" title="标签">#java</a><a href="/tags/?tag=spring%20boot" title="标签">#spring boot</a><a href="/tags/?tag=WebDriver" title="标签">#WebDriver</a><a href="/tags/?tag=selenium-java" title="标签">#selenium-java</a></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2024-12-06, 10:03:39</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/pages/311841/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">使用java生成微信随机加好友的链接</div></a> <!----></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/pages/311841/" class="prev">使用java生成微信随机加好友的链接</a></span> <!----></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/archives" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/pages/4ab140/"><div>
            利用cf大善人的 pages+AI gateway 搭建自己的AI平台
            <!----></div></a> <span class="date">12-06</span></dt></dl><dl><dd>02</dd> <dt><a href="/pages/104183/"><div>
            java playwright爬虫
            <!----></div></a> <span class="date">11-06</span></dt></dl><dl><dd>03</dd> <dt><a href="/pages/bdcbb5/"><div>
            连接chrome调试
            <!----></div></a> <span class="date">07-23</span></dt></dl> <dl><dd></dd> <dt><a href="/archives" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><div class="icons"><a href="fangweilong@outlook.com" title="发邮件" target="_blank" class="iconfont icon-youjian"></a><a href="https://github.com/fangweilong" title="GitHub" target="_blank" class="iconfont icon-github"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2021-2024
    <span> Teler 版权所有 | 我的博客小站。欢迎评论OR转发！</span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <div class="body-bg" style="background:url() center center / cover no-repeat;opacity:0.5;"></div> <!----> <!----></div><div class="global-ui"><div></div><canvas id="vuepress-canvas-cursor"></canvas><div></div></div></div>
    <script src="/assets/js/app.d41d74c0.js" defer></script><script src="/assets/js/2.023436e0.js" defer></script><script src="/assets/js/49.08b41247.js" defer></script>
  </body>
</html>
